package design2.visitor.example.user.impl;

import design2.visitor.example.user.User;
import design2.visitor.example.visitor.Visitor;

public class Student extends User {

    public Student(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    //排名
    public int ranking(){
        return  (int)(Math.random()*100);
    }
}
